RGW Command cheatsheet
RGW Command cheatsheet
- To list the bucket contents using radosgw-admin command:
# radosgw-admin bucket radoslist --bucket kjbucket
1847c1d2-a429-4a01-a65b-30eac3893e1e.115075.1_anaconda-ks.cfg
1847c1d2-a429-4a01-a65b-30eac3893e1e.115075.1_default.realm
- BI list
# radosgw-admin bi list --bucket kjbucket
[
{
"type": "plain",
"idx": "anaconda-ks.cfg",
"entry": {
"name": "anaconda-ks.cfg",
"instance": "",
"ver": {
"pool": 37,
"epoch": 4
},
"locator": "",
"exists": true,
"meta": {
"category": 1,
"size": 694,
"mtime": "2025-03-21T10:43:25.608079Z",
"etag": "4ecd12e7bb388fdba701229b1f2cda17",
"storage_class": "STANDARD",
"owner": "kj",
"owner_display_name": "kj",
"content_type": "text/plain",
"accounted_size": 694,
"user_data": "",
"appendable": false
},
"tag": "1847c1d2-a429-4a01-a65b-30eac3893e1e.245100.16686463904820867720",
"flags": 0,
"pending_map": [],
"versioned_epoch": 0
}
},
{
"type": "plain",
"idx": "default.realm",
"entry": {
"name": "default.realm",
"instance": "",
"ver": {
"pool": 37,
"epoch": 5
},
"locator": "",
"exists": true,
"meta": {
"category": 1,
"size": 46,
"mtime": "2025-03-21T10:43:53.700165Z",
"etag": "3affad698c9b19cae526966e5a0c6c33",
"storage_class": "STANDARD",
"owner": "kj",
"owner_display_name": "kj",
"content_type": "application/octet-stream",
"accounted_size": 46,
"user_data": "",
"appendable": false
},
"tag": "1847c1d2-a429-4a01-a65b-30eac3893e1e.245100.5942870464582921876",
"flags": 0,
"pending_map": [],
"versioned_epoch": 0
}
}
]
- get the object manifest of the object.
# radosgw-admin object manifest --bucket kjbucket --object anaconda-ks.cfg
{
"size": 694,
"objects": [
{
"index": 0,
"part_id": 0,
"stripe_id": 0,
"offset": 0,
"size": 694,
"raw_obj": {
"pool": "kerala.rgw.buckets.data",
"oid": "1847c1d2-a429-4a01-a65b-30eac3893e1e.115075.1_anaconda-ks.cfg",
"loc": ""
}
}
]
}
- Get object stat
# radosgw-admin object stat --bucket kjbucket --object 10mb_object
{
"name": "10mb_object",
"size": 10485760,
"policy": {
"acl": {
"acl_user_map": [
{
"user": "kj",
"acl": 15
}
],
"acl_group_map": [],
"grant_map": [
{
"id": "kj",
"grant": {
"type": {
"type": 0
},
"id": "kj",
"name": "kj",
"permission": {
"flags": 15
}
}
}
]
},
"owner": {
"id": "kj",
"display_name": "kj"
}
},
"etag": "f1c9645dbc14efddc7d8a322685f26eb",
"tag": "1847c1d2-a429-4a01-a65b-30eac3893e1e.245100.6787769343957597863",
"manifest": {
"objs": [],
"obj_size": 10485760,
"explicit_objs": false,
"head_size": 4194304,
"max_head_size": 4194304,
"prefix": ".3RXYVnUwzlNxZ4byiE66Pgb0593fydH_",
"rules": [
{
"key": 0,
"val": {
"start_part_num": 0,
"start_ofs": 4194304,
"part_size": 0,
"stripe_max_size": 4194304,
"override_prefix": ""
}
}
],
"tail_instance": "",
"tail_placement": {
"bucket": {
"name": "kjbucket",
"marker": "1847c1d2-a429-4a01-a65b-30eac3893e1e.115075.1",
"bucket_id": "1847c1d2-a429-4a01-a65b-30eac3893e1e.115075.1",
"tenant": "",
"explicit_placement": {
"data_pool": "",
"data_extra_pool": "",
"index_pool": ""
}
},
"placement_rule": "default-placement"
},
"tier_type": "",
"begin_iter": {
"part_ofs": 0,
"stripe_ofs": 0,
"ofs": 0,
"stripe_size": 4194304,
"cur_part_id": 0,
"cur_stripe": 0,
"cur_override_prefix": "",
"location": {
"placement_rule": "default-placement",
"obj": {
"bucket": {
"name": "kjbucket",
"marker": "1847c1d2-a429-4a01-a65b-30eac3893e1e.115075.1",
"bucket_id": "1847c1d2-a429-4a01-a65b-30eac3893e1e.115075.1",
"tenant": "",
"explicit_placement": {
"data_pool": "",
"data_extra_pool": "",
"index_pool": ""
}
},
"key": {
"name": "10mb_object",
"instance": "",
"ns": ""
}
},
"raw_obj": {
"pool": "",
"oid": "",
"loc": ""
},
"is_raw": false
}
},
"end_iter": {
"part_ofs": 4194304,
"stripe_ofs": 8388608,
"ofs": 10485760,
"stripe_size": 2097152,
"cur_part_id": 0,
"cur_stripe": 2,
"cur_override_prefix": "",
"location": {
"placement_rule": "default-placement",
"obj": {
"bucket": {
"name": "kjbucket",
"marker": "1847c1d2-a429-4a01-a65b-30eac3893e1e.115075.1",
"bucket_id": "1847c1d2-a429-4a01-a65b-30eac3893e1e.115075.1",
"tenant": "",
"explicit_placement": {
"data_pool": "",
"data_extra_pool": "",
"index_pool": ""
}
},
"key": {
"name": ".3RXYVnUwzlNxZ4byiE66Pgb0593fydH_2",
"instance": "",
"ns": "shadow"
}
},
"raw_obj": {
"pool": "",
"oid": "",
"loc": ""
},
"is_raw": false
}
}
},
"pg_ver": 11,
"source_zone": 2767882313,
"attrs": {
"user.rgw.content_type": "application/octet-stream",
"user.rgw.tail_tag": "1847c1d2-a429-4a01-a65b-30eac3893e1e.245100.6787769343957597863",
"user.rgw.x-amz-meta-s3cmd-attrs": "atime:1742564965/ctime:1742564965/gid:0/gname:root/md5:f1c9645dbc14efddc7d8a322685f26eb/mode:33188/mtime:1742564965/uid:0/uname:root"
}
}